package com.twu.biblioteca;

/**
 * Created by IntelliJ IDEA.
 * User: dixithk
 * Date: 6/18/14
 * Time: 11:08 AM
 * To change this template use File | Settings | File Templates.
 */
public class Result {
    
    private String answer;
    private boolean okay;

    public Result(String answer, boolean okay)
    {
        this.answer = answer;
        this.okay = okay;
    }

    public String getAnswer()
    {
        return answer;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Result that = (Result) o;

        if (okay != that.okay) return false;
        if (answer != null ? !answer.equals(that.answer) : that.answer != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = answer != null ? answer.hashCode() : 0;
        result = 31 * result + (okay ? 1 : 0);
        return result;
    }
}
